package duppentity;

import com.google.gson.JsonObject;
import duppentity.annotations.Dupp;
import duppentity.annotations.Param;

public interface ItemDupp {
    
    /**
     * 菜单项列表
     */
    @Dupp("mng.sysItem.getList")
    JsonObject getItemList(@Param("offset") Integer offset,
                           @Param("count") Integer count);

    @Dupp("sysItem.get")
    JsonObject getItem(@Param("id")Long id);

    @Dupp("sysItem.create")
    JsonObject addItem(@Param("sessionId")String sessionId,
                       @Param("userId")Long userId,
                       @Param("parentId")Long parentId,
                       @Param("level")Integer level,
                       @Param("name")String name,
                       @Param("style")String style,
                       @Param("sequence")Integer sequence,
                       @Param("itemHref")String itemHref,
                       @Param("createBy")Long createBy);

    @Dupp("sysItem.update")
    JsonObject editItem(@Param("sessionId")String sessionId,
                        @Param("userId")Long userId,
                        @Param("id")Long id,
                        @Param("parentId")Long parentId,
                        @Param("level")Integer level,
                        @Param("name")String name,
                        @Param("style")String style,
                        @Param("sequence")Integer sequence,
                        @Param("itemHref")String itemHref,
                        @Param("modifyBy")Long modifyBy);

    @Dupp("sysItem.delete")
    JsonObject deleteItem(@Param("id")Long id,
                          @Param("modifyBy")Long modifyBy);

    @Dupp("sysRoleItem.create")
    JsonObject addRoleItem(@Param("sessionId")String sessionId,
                       @Param("userId")Long userId,
                       @Param("itemId")Long itemId,
                       @Param("roleId")Long roleId,
                       @Param("createBy")Long createBy);
}
